home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d7 / ap100.arc / PUMAXMT.SLT < prev    next >
Text File  |  1991-04-28  |  2KB  |  54 lines

  1. str pumacmd [127];
  2. main()
  3. {
  4.     int lfp, len, c, first, last;
  5.     str fullpath [80];
  6.     str file[80];
  7.     str port [4];
  8.  
  9.     lfp=fopen ("pumalist","w");
  10.     if (lfp == -1) {
  11.         prints ("cannot open list file");
  12.         return (0);
  13.     }
  14.     len=strlen (_ext_filespec);
  15.     first=0;
  16.     last=0;
  17.     while (last < len) {
  18.         last=strchr (_ext_filespec, first, ' ');
  19.         if (last == -1) last = len;
  20.         substr (_ext_filespec,first,last-first,file);
  21.         if (first == 0) {
  22.             // first file already has dir prepended.
  23.             fputs (file,lfp);
  24.         }
  25.         else {
  26.                         if (subchr (file, 0) != '\' && subchr (file, 0) != '.' && subchr(file, 1) != ':') {
  27.                 substr (_up_dir,0,65,fullpath);
  28.                 strcat (fullpath,file);
  29.                 fputs (fullpath,lfp);
  30.             }
  31.             else fputs (file,lfp);
  32.         }
  33.                 fputs ("^M^J",lfp);
  34.         first=last+1;
  35.     }
  36.     fclose (lfp);
  37.         pumacmd="N+ F+ M- P";
  38.     itos (get_port(), port);
  39.     strcat (pumacmd, port);        // add port
  40.     strcat (pumacmd, " S0");    // port speed (0=auto adjust)
  41.         if (_zmod_scrash) strcat (pumacmd, " R+");      // resume file
  42.         else strcat (pumacmd, " O+");                   // overwrite file
  43.         if (_sound_on) strcat (pumacmd, " B+");         // beep when finished
  44.         else strcat (pumacmd, " B-");                   // silence
  45.         strcat (pumacmd, " X+ s @pumalist");
  46.     prints (pumacmd);
  47.     // try MPT (the newer version) first, then puma.
  48.         if (run ("mpt",pumacmd,0) == -1) {
  49.                 run ("puma",pumacmd,0);
  50.         }
  51.     fdelete ("pumalist");
  52.         return (0);
  53. }
  54.